Fix error with wrong type variable.