fix className issue and function not found issue (side effects)