Fixes for transform and grammar