fixed wrong var declaration type