Database now seem to work properly

Will see what happens after merging in Dev..