stage layers length fix