averting database deadlocks by mutexing db-operations
fixed erroneous behaviour of view editor