Stage code improve