Manually merged fix from nurupo.