Fixed minor problem with an EntityException.