fixing all the bugs in jlipps code
Merge pull request #103 from santiycr/master

squashing the bugs