fixed closing brace on if