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