Bugfixes on Fomin's algorithms.

Signed-off-by: Viktor Tomkovič <viktor.tomkovic@gmail.com>