fixed some issues with parsing AWS JSON