Fix edit mode