reproduce https://github.com/petejkim/specta/pull/27