Miscellaneous API fixes