Fix bug on new API