[JENKINS-21838] Fixed the implementation

Resolves https://issues.jenkins-ci.org/browse/JENKINS-21838

Signed-off-by: Oleg Nenashev <o.v.nenashev@gmail.com>