More fixes (shouldn't really try and do this in the browser...)