Fixed error when adding item