debugged zoom to layer