Fixed layer loading bug