Fixes #264 - replaceState was wonky