help with this if statment

if(digitalRead(encoder0Btn) == LOW){ start = true; if(finished == true){ calculateTime(counter); start = false; finished = false;

} }

the finished is set to true further down in the loop. The statement works, that is start = false only if I take out the line finished = false;

finished = false seems to be the problem.

Im not sure, maybe it's my bad syntax?

It wold help if you posted the whole code.

http://pastebin.com/m4c89bb5a

the encode0btn if statement only works the first time now, to make start = true and to start the loop.