Fix activity monitor error handling