Misc small fixes