[Olena-patches] 2688: Fix bugs in low level routines.