added a hack to prevent rendering twice from raising an exception