Fixed some issues which bugged a ranged PUT upload