Remove typo-ed `get_first_entity` 2nd paremeter
Fix wrong pointers
Validate and croak with return values of `Package` functions