Remove debug message and unexpected line of code