Fork to avoid deadlock