Sorted out a small bug