improve fork handling. #199