small fixes and extensions