Fix for empty database