Try to use braces always even if not needed like here

if (...){
    ...
}else{
    ...
}