bug fix - deselect not working correctly

Bug that caused the independent databases from not working. The config
dbselect was over written by the image storage dbselect. Now fixed