checking for fork flag