fixing local bugs