Correct cards function to work in all situations
Merge pull request #229 from guardian/related-function

Correct cards function to work in all situations