fix selecting nearest header

firefox seems to be off by a bit and I am too lazy to actually fix this
seriously

fixes #151