Fixed bug in vacuum and rebuildIndex