Fix #198

This works in Firefox and Firefox OS. Can someone test Chrome?