Please see https://github.com/MITK/MITK/pull/239 for details. I am happy to provide more info if required.
Requested code changes in pull request.