Some fixes and other stuff