Fix bug and add new spec