Fix #cos and add specs