fixed the bug on asserting nil pointer