clean up cart query and fix spec