fixed edit mode flag for adding resource