fixed a bunch of little bugs migrating over to sammy.js