bugs in setupPreparedStatement