some shenanigans with the encoding when using .pushstate