fix victory condition check