Fixed multiple bugs. More to go