fixed upgrading without funds bug