Solved the problem that would 'reset' the database after entering on serttings fragment.