fix few bugs
merge conflict