Fixed some bugs from my phone coding