Fixed it so that level ends when time is up or goal is reached