Fixes #2842
A better fix.
cleanup.