diff --git a/oemhandler.C b/oemhandler.C
index 026e0d1..8d522c2 100644
--- a/oemhandler.C
+++ b/oemhandler.C
@@ -4,6 +4,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <systemd/sd-bus.h>
+#include <endian.h>
 
 void register_netfn_oem_partial_esel() __attribute__((constructor));
 
@@ -26,25 +27,23 @@
                                      ipmi_request_t request, ipmi_response_t response,
                                      ipmi_data_len_t data_len, ipmi_context_t context)
 {
-	esel_request_t *reqptr = (esel_request_t*) request;
+	uint8_t *reqptr = (uint8_t *) request;
+	esel_request_t esel_req;
 	FILE *fp;
 	int r = 0;
-	// TODO: Issue 5: This is not endian-safe.
-	short *recid  =  (short*) &reqptr->selrecordls;
-	short *offset =  (short*) &reqptr->offsetls;
 	uint8_t rlen;
 	ipmi_ret_t rc = IPMI_CC_OK;
 	const char *pio;
 
-	unsigned short used_res_id = 0;
-	unsigned short req_res_id = 0;
+	esel_req.resid     = le16toh((((uint16_t) reqptr[1]) << 8) + reqptr[0]);
+	esel_req.selrecord = le16toh((((uint16_t) reqptr[3]) << 8) + reqptr[2]);
+	esel_req.offset    = le16toh((((uint16_t) reqptr[5]) << 8) + reqptr[4]);
+	esel_req.progress  = reqptr[6];
 
-	used_res_id = get_sel_reserve_id();
-
-	req_res_id = (((unsigned short)reqptr->residms) << 8) + reqptr->residls;
+	uint16_t used_res_id = get_sel_reserve_id();
 
 	// According to IPMI spec, Reservation ID must be checked.
-	if ( used_res_id != req_res_id ) {
+	if ( used_res_id != esel_req.resid ) {
 		// 0xc5 means Reservation Cancelled or Invalid Reservation ID.
 		printf("Used Reservation ID = %d\n", used_res_id);
 		rc = IPMI_CC_INVALID_RESERVATION_ID;
@@ -59,7 +58,7 @@
 
     // OpenPOWER Host Interface spec says if RecordID and Offset are
 	// 0 then then this is a new request
-	if (!*recid && !*offset)
+	if (!esel_req.selrecord && !esel_req.offset)
 		pio = "wb";
 	else
 		pio = "rb+";
@@ -67,11 +66,11 @@
 	rlen = (*data_len) - (uint8_t) (sizeof(esel_request_t));
 
 	printf("IPMI PARTIAL ESEL for %s  Offset = %d Length = %d\n",
-		g_esel_path, *offset, rlen);
+		g_esel_path, esel_req.offset, rlen);
 
 	if ((fp = fopen(g_esel_path, pio)) != NULL) {
-		fseek(fp, *offset, SEEK_SET);
-		fwrite(reqptr+1,rlen,1,fp);
+		fseek(fp, esel_req.offset, SEEK_SET);
+		fwrite(reqptr+(uint8_t) (sizeof(esel_request_t)), rlen, 1, fp);
 		fclose(fp);
 
 		*data_len = sizeof(g_record_id);
@@ -86,7 +85,7 @@
 	// coming down.  If that is the case advance the record id so we
 	// don't overlap logs.  This allows anyone to establish a log
 	// directory system.
-	if (reqptr->progress & 1 ) {
+	if (esel_req.progress & 1 ) {
 		g_record_id++;
 	}
 
