Fixes key handling on upload