Fix 'check_ram' and templates