fixes and removed debugging