one more fix to res script