Added code to handle rejections from Server