Apply timeouts and memory limits in more places. In particular, when