fixed a little generating bug. hacky solution though.