fix improper overwriting of endpoints