Fixed getSingleResult