Incorrect calculation of unused size (FS#1108)