added loop to remedy crashes