fix logically issue