Merge pull request #953 from heuripedes/master

Build and Lakka fixes
(Lakka) Fix invalid read