Fixed minor bug and added dependency