Fix locking doors; Fix tree cfactory serialization;