Fixing #665 , #638