bug fixes found in testing