fix client script errors