Corrected a bug