Model based entity but seg fault on display