Fixed bug on api filtering