fixing redundant conditional on check_XID