Fix tests and small incosistencies