Fix size-calculation