call_sql bug squashed