fixes of kernel implementaiton