improvements, bugs fix