bug fixes, Test case update.