several fixes
remove unnecesary variable
Merge pull request #1513 from diegosarmentero/master

several fixes