Adding a check to only shadow when needed