ticket 8: minor bug fixes