some initial fixes, still broken :'(