fixing #896 (https://bugs.yavdr.com/issues/896)