add check
fix small bug