Misc fixed for processIdx and cleanup