Fix for issue #16 - cross-browser issues