Remove trailing ; which made logical condition not effective