fixed scripts and split bug