Added double check for wrappedPreparedStatement to fix potential sync issue (fixes #140)