Fixed minor out of range errors