fixed two issues on ubuntu