fixed the weird null error in string and fixed initial game loop