Add logging and possible fix