fix bugs in FindParentsPlugin

Signed-off-by: Alexandr <xescoder@gmail.com>