When mixing and mastering tracks, the very last step in the audio processing should be to trim the heads and tails and to do the fade in and fade out at the beginning of the song.
If you do these operations earlier in the process, any gain changes you make will mess up the shape of the fades and may make head/tail edits seem too short or too long.

