Fixes db persistance by adding transactions usage