Fixed some bugs related to insertion process in array