Fixed tests. Still not tested in real app