fixing collision handling and mapgenerator