Fix remove layer connection error