Fixed a bug for findById (branch)