Last updated bug fix and other small bug fixes