Figuring out some errors