Fixes bug in tags insertion to API