Fixed settings issue in script