Fixed flickering issue when map loading
Fixed issues which may happen with the fix for issue #124