Fix incorrect rule application
Merge pull request #6 from parshikov/bugfix_issue_5

Fix #5: Incorrect rule application