Fixed bug, compare functions need to return an int not a long