Fixes save to db