fixed one bug, introduced another.