[ADD] some bug fixes