Removed duplicate code, temp fix for division bug