Fix some issues pointed out by Emily and Craig.