Minor improvement on size calculation