fixed shadow logic