fixed redundant condition