fix #919
solution for #962 was incorrectly implemented