closes #685, fix some tests