more perl tests
bug fixes in debug