Fixed a bug preventing finding record with id of 0 (#352)