syntax check improvements, fixes