Fixed CALayer bug