fix missing array check and LKASSERT