fixed #45 + fixed minor bug on upload page