fix shadow bug and test - fixes #26