Other small fixes: public entity and handle empty entities