fixing instance variable issue in map partial