Fix wrong defuns called when initialising css and js modes