better errors; clearing form correctly