Fixed those bugs that I just introduced