Proceed only if the database is found
Merge pull request #668 from kasunchathuranga/navSelect

Proceed only if the database is found