added typecast line per advice of MM forum