fix head command to work without protocol specified