Fixed ref str bug

changed: 
set temp to 182 - (offset of (character k of key_) in global_r)
to
set temp to (2 * (length of global_) + 2) - (offset of (character k of key_) in global_r)

also added a " " to the ref str