Fixed bugs inside gmaputils.

Signed-off-by: robertomorati <robertomorati@gmail.com>