Fixed creating an empty entity

Change-Id: Ib26abf43cd8edf5412c9867d2fc30fded850d162