Correcting division-by-zero error. Updates #1