Fixed EmptyResultSet exception