Workaround for bug on the Mac