fixed layer resize issue