clean up prefix handling