Fixed issues with index going out of bounds. Need to create an asynctask to handle multipart entities