export to excel; minor bug fixes