small fixes and improvments