fixed ATOM encoding