insertitem nullpointer bug fixed