fixed edit lock code