few fixes for scripts