There was some indentation issues in the code. Fixed it.