Fixed redundant code