Change '< 0' to '== -1' in if sentence.