Moved add save handler code to correct place