Removed prints and bug fix