fixed a bug, but introduced a new one