fixing some bugs on tests (ref issue #1)