debugged conditional

debugged conditional