Fixed closed problem with if..else and if.