Change code to use get_last_statement
Issue #90 When using set_expr alone it doesn't trigger query creation