fix setLayer