Move del statements inside of else block