Some bugs fixed on APIv1