Cleanup prefix handling.