Move to API layer 17, bug fixes