Added more logic for problem.