Fixed Issues with Save Function