Finish uint test and fixed several bugs.