multiple changes

bugs fix and multiple changes