added 'this' check for prepared statements (#353)