bug fixes, increase logging