fixed missing paren, moved done var