code changes for the bug fixes...