Fixed minor bug in receiving files