fixed a small bug in not assigning correct widhts