Fixed string cast bug