Fixed MCS deadlock bug