fixes #1776