Changed SQLDatabase to get gallery back up and running