fix inheritance and handle uploads