Sorted out indentation
Fixed error message going to wrong input