Lyahov bug-fixing