Fixing cap conversion bugs