Fixed save code for final sample