fixed null pointer exception bug when modyfing a reference