some fixes in findBy method