More crossplatform-ish version