Fixed a bug re. weights