some little fixes for script