Test and fixes