some fixes in the db persistence store. ID-171