Fixes nav icon swap javascript