Some bugfix and update ga code