Fixes to the abstract machine