fixed bug in get_weight (0 interpreted as false..)