Fixed base conversion to prevent app crash on tablets

Change-Id: I9e7569b0ec23b4271872804c3842c016fb515329