Fixing the Petri Net compilation