remove unnecessary condition from conversion code