fixed prepared statement creation order, refs #638