cleaned up getLayer fix logic