Fixed an issue where the active tanning layer would be removed when exceeding the maximum tanning layers