fixing some issues - but many more remain :(