Some fixes and a couple of things