fix incorrect stack length check