Fixed incorrect condition