fix a bug in ast