Idiotic programming error