Fixed another set of bugs