rebuild, fix bugs