fixing #1077