Moved calls to refreshMap and fixed typo
Removed length