Fix for element getting removed when mobile option true