fixed npe when trying to add to a crate when none exist