Fixed test

Accessing wrong property
Fixed defects found by unit tests

Mostly negative number problems, or argument out of bounds issues