Changed some bugs