fix JS routing issues