maybe fixed logging