some fixes to make it build again