fixed summary and inference bug