bug fixes + testing