map and image library bug fixes