APIv1: fix a number of issues