More bug fixes and debug for rebase tool