fixed a couple test problems and fixed #259