Apply fixes from #3