Fix upload hook