Fix bug with graphics upload