fixed memory error.... 

TODO mapping into memory is wrong?