fixed bug that did not validate api details before updating