bug fixes to make sure that logs are retrieved correctly