fix late night bug