Division error bugfix