Bugs Fixed

Some parts modified.