Fixing PVS warnings
unlocking mutex while waiting