Fixed bug causing add to fail