bugfix in logged, requires cleanup