Fixed ast validation