Andrew's fixes from office hours