Fixed the "'map' object has no attribute 'append'" bug which randomly pops up. I couldn't figure out how to reproduce the bug.