Bug fix. All praise be to -fbounds-check