fix to render layer reference bug.