Fixing empty resultset