Fix layer shapes problem