Fixed a bug in memory.c where we didn't shift.