Some small fixes and changes