Fixed Writing to Registry and Compiled