bug fixes, new test scripts