Corrected some bug