fixes  #3045

Added code.