fix division zero error