fixed if statements using index offsets instead of addresses
fixed if statements using index offsets instead of addresses

mikedlowis-prototypes/sclpl,mikedlowis/sclpl,mikedlowis-prototypes/sclpl,mikedlowis/sclpl