Avoid variable type mismatch