Correct bug and add new features