Massive performance improvement in kernel

Changed an else statement to else-if and achieved a huge improvement in
performance for no sensible reason