Size calculation fix