hide error div when switching views