Fix some problems with corepetrinet