Fixed bugs in 'monad/inferrence' module.