fix bugs.
fix ruby scripts.