fix verices and indices allocation problem