fix bugs to handle non-exist ticket