database_selector fixes. #358