Take into account timeBehaviour parameter of layer
fix build error
Taking advice into account