Fix ast issues