Revert "Shadow bugfixes"

This reverts commit cd2595edf02d8fd6af2ae45d299a03b546f6f034.