fix bugs almost finish