fix checking layer for dimension2