fix display issue

This seems to only be a problem on Scratch's browser, but it was sloppy
code, so I'm cleaning it up.