Added overlay addition/removal checks.