Fix AddEntityCommand for 4.5+