Made the games directive more robust