Fixed prefix replacement being wrong