edit command bug fixes