fixed undefined variable cart