Fix bug where if db did not exist, id selector would be blank