fixed script inclusion order
fixed merge problems