remove some savesql() calls in favour of prepared statements