#525: fix detection issues