fixed some generation code to make it work better with an actual player