adding tests for PR#476