fixed division issues