What type is bg_img['offset']? Necessary to cast here instead of storing as such?