fix redundant codes