Fix a little bugs

It didn't work on my computer.
I found some bugs and fixed it.