Need help debugging the X stuff