Changed the block/item replacement methods, might not work on 32 bit machines