Fixed issue with basecase conversion

Previous version did not check for current base when converting from HEX to DEC.