fixed a test and some minor tweaks