Optimization of dynamic aperture for hadron lattices in eRHIC