Deep levels in insulating GaN grown by metalorganic vapor phase epitaxy (MOVPE) have been studied using thermally stimulated current (TSC) and photocurrent (PC) spectroscopies. Five main levels (0.11, 0.24, 0.36, 0.53 and 0.62 eV) were observed by TSC measurements in the as-grown undoped GaN. PC measurements showed three deep levels located within bandgap at 1.32, 1.70 and 2.36 eV, respectively, We found that three of the levels, located at 0.24, 0.36 and 0.53 eV, were eliminated by annealing at 1000 degrees C under N-2 for six hours, whereas the 0.62 eV level density increased after annealing. In addition, both the responsivity and on/off rimes of GaN metal-semiconductor-metal (M-S-M) detectors degrade with increasing concentration of the 0.62 eV trap. We have also found that this trap can be effectively reduced by increasing the ammonia flow rate during the MOVPE growth. Accordingly, a high responsivity (similar to 3200 A/W) UV detector with an improved response lime, from 8 to 0.4 ms, was fabricated on GaN grown under the optimized conditions.