fix bug parsing long options