fixed matt's horrendous bug