More checks when writing to ram. Fixes #62
Merge pull request #63 from LemonBoy/yakumanfix

More checks when writing to ram. Fixes #62