fix unlink and closing prentheses