fixed barrett's broken bug