closes  #587