[fix] Partially revert bc4c23929f3ce4ba66650130675405a1e85bb26c. Fixes #325.