fix errors due to change to ast