Dennis\s bugs fix