fixed nasty bugs

http://stackoverflow.com/questions/17201504/different-this-memory-addres
s-in-c-constructors