fixed issue with api not returning created object