Some fixs and tests