patches to make ast test work