fixed scripts errors