fixed bug that crashed the socket when the application enters the background. Started receiving image from server