corrected some bug