Some bug fixes in Mahout related code