Remove unnecessary if structure