Fixed crashes with division