Fixed the getops loop