another attempt at fixing fatal bug