A revised version of PR #330 that passes all specs.

This is basically PR #330 with passing specs.
Please provide a test that validates this change. There should be an available and not available fixtures with corresponding specs, to validate this change.