Optimized code and fixed a register bug.