Fixed bug with cascade upload and some other small fixes