Fix the size calculation