- various bug fixes