[2.0] Remove string casts

fixes #1182