Better logic in rules. Error caught in case of lag
Merge pull request #28 from williecheong/staging

Better logic in rules. Error caught in case of lag