Fixes for the custom add shadow script