diff --git a/projects/fire_works/src/main.cpp b/projects/fire_works/src/main.cpp
index ebfa88d7b91bf274817ecb93113bb86ed5364e9e..7f96170c813a9fde0971c694911c252783314574 100644
--- a/projects/fire_works/src/main.cpp
+++ b/projects/fire_works/src/main.cpp
@@ -832,7 +832,14 @@ int main(int argc, const char **argv) {
 		gui.beginGUI();
 		ImGui::Begin("Settings");
 		
-		if (ImGui::Button("Reset")) {
+		bool resetTime = ImGui::Button("Reset");
+		
+		ImGui::End();
+		gui.endGUI();
+		
+		core.endFrame(windowHandle);
+		
+		if (resetTime) {
 			start = std::chrono::system_clock::now();
 			
 			particleBuffer.fill(particles);
@@ -843,11 +850,6 @@ int main(int argc, const char **argv) {
 			
 			memset(smokeIndices, 0, smokeIndexBuffer.getSize());
 		}
-		
-		ImGui::End();
-		gui.endGUI();
-		
-		core.endFrame(windowHandle);
 	}
 	
 	smokeIndexBuffer.unmap();