bug fixes for spec