Improved Unittes, fixed out of range error