fix add to layer

should fix the "hack" to the addTo method