fixed bug with scalar not cast to string