Fixed issues found when testing with Docker container