fixed type casting in  and if((string) )