Modify status check to be more robust.