Corrected a type overflow bug