Issue 373

I changed the rules and added some tests. This should solve Issue #373.