Fixed segfaulting kernel calls