Added ternary operator to fix out of bounds bug in save_already_done().