Updated marks to handle errors better