Update on #1042. Fixed order of returned kernels