Fixes removeHeader method to work with header name indexed headers array