Fixes bug in end-end to else-end conversion