ensure 5.2 compatibility and document hack