fixed annoying error on empty resultset