modified fork handling