More image bug fixes, outputstream is closed when client sends an image however