Fix for wrong expire check

Fixes #57