misc fixes, still debugging