Adding dependencies and bug fix