fixed wrong variable type