Fix layer addition