Fix the if block nesting
Error in bash