Fix bugs on same time event scheduling, and improves compare.sh