layer tag can sometimes have value not castable in integer...