many fixes, more bugs