fix two bugs that are totally Ezekiel's fault