fix #902

Long time ago it works fine, but when for some reason behavior has been changed.