Fixed bug in classify due to multiple return statements