Image stitching error

When using the image stitcher I get an exception always after 8 stitches:

u->refcount == 0 && "UMat deallocation error: some derived Mat is still alive

Anyone any ideas how to fix this?