Test and bug correction