fixed an assert bug