Fix bug while forking