Primitive version seems to be working now.