Updated detection logic a bit.

Signed-off-by: Stephan Peijnik <speijnik@anexia-it.com>