fixed errors in getop()