Merge pull request #392 from christianwach/1.6.x

Check for function not file