Fix bug and add new features to v2