Updated my patch little bit. Added extra check.