fixes #540
Merge pull request #1417 from jsbin/fix/540

fixes #540