Fixed testing logic.