Fix navigation javascript