fixed some assertion failure