many many small fixes