Fixed some bug on client