Small bug in weight one half code