correcting previous commit with three small fixes