fixed redundant bugs