Fixed bugs that created General Error, when an inserting single entry which is followed by findOne on that primary key