Update test an fix bugs