added homog err as persistant weight. fixed bounds issues of asserts on windows
wip