Fixed database stuff
Fixed merge conflict