updated version that fixes firefox.width/height = 0 bug

see master-branch for more information