Added priming and fixed forking