fix pointer + possible bug