Fix #916

I have checked this locally but easier to make change in github