Adds code for PR #2 and also, fixes a previous mistake in specs