fix UNEXPECTED 'TERMINATOR' problem