Correctly checked for existing layer