Bugs fix and improves