Close Statement and ResultSet properly