Fixed some broken prefix handling in Core