Kaufman resolved the first problem by making Joel lucid and able to comment on his memories and solved the second by making the memories degrade instead of immediately erasing, with complete erasure occurring at awakening.