fixes some bugs in correlation and image cuts