Fixed #252

* Adds an if-clause to check if the current request actually exists
Merge pull request #253 from frmwrk123/fix/252

Fixed #252