Script partition bug fixes