fix logic for comment controller