Add if/else support, fix issue with if only situations