fix kernel, update memory counts