Fixed issue where bar weight could become nil/nan, causing app crashing.