tried to fix bugs...