minor bug fixes / formatting