moving stuff around to prevent lua fails