Was using zero-based page addressing when 1-based is required.  This fixed the first segfault.