fix fatal bug