added fork guarding