more cast coding standard fixes