fix resource memory leak introduced by PreparedStatements that were never being closed