Enchanced error reporting
Fixed use of invalid _ref term on read after clear env