Fixed an fatal bug