Fix bug found by monkey