Fixed an issue with layers switching their type at export.