some fixes and refactored radius handling