Made fixes to conditional code