Fix bugs but very slow