Fixed Issue #652, #1091
Merge pull request #1098 from diegosarmentero/master

 Fixed Issue #652, #1091