bug fixes, now all seems to work.