fix admin js crashing