ST monad bug