fixed some minor issues with tests. Also tested #1