fixes for type casting and concatination