small fixes to make it work