fix svg resizing

Also fixed some style issues with semicolons and using != rather than !==.