fixing bug in used space