FIX: Making tests more robust