Fix unnecessary code