Bug Fixes
Combined into one file.
Optimisations.Bug Fixes