edited errors and changed template file.