Fixed usage of wrong size calculation