Bugfix: when DB empty the app crashed