fix weight and margin