it might be safer to add `if (!prefix.empty())`.