Added more error checking for bad items specs