fix #1017 

I think it solve this.