Fixing #640