Fixes to support the half-moon encoding