Fix some issues pointed out by Ben and Emily.