various improves and fixes