Merge pull request #1 from kdau/master

Two minor fixes for lg
Shut-up useless aliasing warning.