fixes, still need to clean up logging