fd made serializable, minor fixes