fixed edit and refresh issues