fix app js redirect problem