fix on setting exam in controller