some minor fix-up to get it working in Chrome