fixed long comparing in entities