fixing bugs + handling server down