fix bug with pre-syntax check