Some changes to prepared statements in helpers