Fix: Handle extraHead parameter properly when it is a string