Another regression was fixed
Hopefully fixed the last regression
Fixed valgrind errors