Validates tasks when saving problem.

Fix #11.