fixed safari bug, now using base for parseInt