Fixed bug with wrong value of shadow_id