revert last commit and integrate Rene's patch instead