I redid the code so that all bugs are fixed. If you want to, go into the project and check out the code.