themes: prevent error mutex lock/unlock