Fixes #8796 - Fix to_gb size calculation and constantize