Fixed crashing issue on the reset-password route