Remove debuggin code and fix but of using wrong variable name