More light improvements

- Fixed some errors while generating the terrain