Fix a minor bug and some specs