fixing with more logging