Cast sizes

Simple fix for #457