Whenever i put it into the hack mode and try to take a pic it would completely freeze up and the only solution was to remove the battery.
How are you "trying to take a picture in hack mode" ? When you press the shutter button in <ALT> mode (which is what I assume you mean by hack mode) then CHDK launches the currently loaded script. Depending on which script you have loaded, that might explain the behavior you are seeing.
It's also not impossible the code on your SD card is somehow corrupted. Reloading it with the most current version is easy if you use the STICK utility.