Fix js bugs for non-admin.