fix for empty database