fix bugs in tryTakeMVar/tryPutMVar