Fixed minor bug in handling HB check