Fix hover edit function bug