minor fixes -> mainly replaceing NULL with UA_NULL