fix wrong variable type