changes to support forking