fixed fatal bug