Fix some bugs in monolz