fixed loop bug in kernel

kernel was throwing up strange loops before this. Was caused by label confusion.