Fixes #1307

Fixed #1307