Fixed some bug