Fixing mutex lock problem and preventing loading of local resource definitions.