Fixed possible error in #670