fix check register bug