Fix implicit conversion to string error