Fix bug when used in LayerDrawable