fixed some locking issues in collection.truncate(), fixed filesize value overflow in collection.figures()