Minor changes

Solved some bugs