Fixes #4987 removed unnecessary code