fixes  #3288

Fixed and tested in master.

Please check.