Fix edit save bug