Fixed free() and fgets()