Fix Jenkins bug, added the check