fix problem with sub layer