Fix backward compatibility hack and unset var