Remove useless code
Make fix more generic