bug fixes, minor changes