Added finalizer to CUFFT plan so resources are cleaned up appropriately
Another place dimensions should be reversed