fixed bug with reusing maps