Some fixes and new features