Better version of a813f8c4506a321f7364ff413e881fd70095bb25.

Signed-off-by: Krzysztof Wilczynski <krzysztof.wilczynski@linux.com>