fixes #1888

Fixed the issue, please check it.