Fixed bugs inside gmaputil

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