Update AI and bugfix