Improved NPC behaviour