Random render utils
Trying to reproduce bug report, but no luck, so removing unnecessary casts instead.