error_status(): fix str/int comparison and unavailable time check