added fix for type cast issue