Fixed small error logic.