Fixed kernel compilation and buffer initialization